package com.example.factory.responsibility.slot.slots;

import com.example.factory.config.BusinessEnum;
import com.example.factory.factory.StrategyInterface;
import com.example.factory.responsibility.Context;
import com.example.factory.responsibility.ResourceWrapper;
import com.example.factory.responsibility.slot.StrategySlot;
import org.springframework.stereotype.Component;
@Component
public class ParticipateSlot extends StrategySlot {
    @Override
    public void entry(Context context, ResourceWrapper wrapper, StrategyInterface param) {
        super.fireEntry(context,wrapper,param);
        StrategyInterface strategy = super.strategyMap.get(context.getBusiness().getService());
        String name = strategy.getParticipate();
        System.out.println(" start of Transition slot"+name);
    }

    @Override
    public void exit(Context context, ResourceWrapper wrapper, Object param) {
        System.out.println(" end of Transition slot");
    }
}
